package com.how2java.tmall.pojo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "deposit")
@JsonIgnoreProperties({"handler", "hibernateLazyInitializer"})
@EntityListeners(AuditingEntityListener.class)
public class Deposit {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "deposit_id")
    public int depositId;

    @Column(name = "money")
    public float money;

    @Column(name = "user_id")
    public Integer userId;

    @Column(name = "goods_id")
    public Integer goodsId;

    @Column(name = "trade_no")
    public String trade_no;


    @Column(name = "status")
    public int status;
    @CreatedDate
    @Column(name = "create_time")
    public Date createTime;
}
